<template>
  <div class="formChild">
    <p class="subTitle">{{source.LBL}}</p>
    <div class="cont">
      <p class="desc">{{source.DESC}}</p>
      <div class="formItems">
        <el-radio-group v-model="radioSelected">
          <el-radio v-for="(item,index) in source.OPTIONS " :key="index" :label="index">{{item.VAL}}</el-radio>
        </el-radio-group>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  name: "formRadio",
  props: {
    source: {
      type: Object,
      default() {
        return {};
      }
    }
  },
   data() {
    return {};
  },
  computed: {
    radioSelected() {
      if (this.source.OPTIONS) {
        let opts = this.source.OPTIONS;
        for (let i = 0; i < opts.length; i++) {
          if (opts[i].CHKED == "1") {
            return i;
          }
        }
      }
    }
  },
};
</script>
<style lang="scss" scoped src="./com.scss"></style>
<style lang="scss" scoped>
.el-radio-group {
  line-height: 36px;
}
</style>